home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / graficos / plydat14.arj / THRESH.PI < prev    next >
Encoding:
Text File  |  1992-04-05  |  4.3 KB  |  182 lines

  1. //
  2. // Demonstration of a squirming blob shape
  3. //
  4. // Polyray input file - Alexander Enzmann
  5. //
  6.  
  7. // Define the range of the animation
  8. start_frame  0
  9. end_frame    119
  10. total_frames 120
  11. outfile thres
  12.  
  13. // Set up the camera
  14. viewpoint {
  15.    from <0,3,-20>
  16.    at <0,0,0>
  17.    up <0,1,0>
  18.    angle 45
  19.    resolution 128, 128
  20.    }
  21.  
  22. // Set up background color & lights
  23. background midnightblue
  24. light <-10,20,-50>
  25. light < 10,20,-50>
  26.  
  27. // The bounding slabs are more for the spheres than for the blob
  28. bounding_slab <1, 0, 0>
  29. bounding_slab <0, 1, 0>
  30. bounding_slab <0, 0, 1>
  31.  
  32. // The only color not defined here is "shiny_red" and could be yanked into
  33. // this file to reduce parse time & save a little memory.
  34. include "colors.inc"
  35.  
  36. // Give the (time dependent) location of the blob points
  37. define ang radians(6 * frame)
  38. define thresh 0.05
  39.  
  40. define r10 1
  41. define r11 1
  42. define r20 2
  43. define r21 1
  44. define r30 2
  45. define r31 3
  46. define r40 3
  47. define r41 4
  48. define r50 4
  49. define r51 1
  50. define r60 1
  51. define r61 3
  52. define r70 2
  53. define r71 2
  54. define r80 3
  55. define r81 5
  56.  
  57. define s1 3
  58. define s2 2
  59. define s3 1.5
  60. define s4 1
  61. define s5 3
  62. define s6 2
  63. define s7 1.5
  64. define s8 1
  65. define s09 2
  66. define s10 1.5
  67. define s11 3
  68. define s12 1.5
  69. define s13 2
  70. define s14 3
  71. define s15 2
  72. define s16 1.5
  73. define s17 1
  74.  
  75. define r09x 3
  76. define r09y 2
  77. define r09z 1
  78. define r10x 1
  79. define r10y 2
  80. define r10z 1
  81. define r11x 2
  82. define r11y 0.5
  83. define r11z 3
  84. define r12x 5
  85. define r12y 0
  86. define r12z 0
  87. define r13x 3
  88. define r13y 3
  89. define r13z 3
  90. define r14x 4
  91. define r14y 0
  92. define r14z 1
  93. define r15x 0
  94. define r15y 0
  95. define r15z 4
  96. define r16x 0
  97. define r16y 3
  98. define r16z 0.5
  99.  
  100. define o09 radians(0)
  101. define o10 radians(192)
  102. define o11 radians(15)
  103. define o12 radians(20)
  104. define o13 radians(117)
  105. define o14 radians(300)
  106. define o15 radians(270)
  107. define o16 radians(90)
  108.  
  109. // Define the positions of the various spheres
  110. define loc1 < r10 * cos(s1*ang), 0, r11 * sin(s1*ang)>
  111. define loc2 < r20 * cos(s2*ang), 0, r21 * sin(s2*ang)>
  112. define loc3 < r30 * cos(s3*ang), 0, r31 * sin(s3*ang)>
  113. define loc4 < r40 * cos(s4*ang), 0, r41 * sin(s4*ang)>
  114. define loc5 < r50 * cos(s5*ang), r51 * sin(s5*ang), 0>
  115. define loc6 < r60 * cos(s6*ang), r61 * sin(s6*ang), 0>
  116. define loc7 < r70 * cos(s7*ang), r71 * sin(s7*ang), 0>
  117. define loc8 < r80 * cos(s8*ang), r81 * sin(s8*ang), 0>
  118.  
  119. define loc09 <r09x*cos(s09*ang+o09),r09y*cos(s09*ang+o09),r09z*cos(s09*ang+o09)>
  120. define loc10 <r10x*cos(s10*ang+o10),r10y*cos(s10*ang+o10),r10z*cos(s10*ang+o10)>
  121. define loc11 <r11x*cos(s11*ang+o11),r11y*cos(s11*ang+o11),r11z*cos(s11*ang+o12)>
  122. define loc12 <r12x*cos(s12*ang+o12),r12y*cos(s12*ang+o12),r12z*cos(s12*ang+o12)>
  123. define loc13 <r13x*cos(s13*ang+o13),r13y*cos(s13*ang+o13),r13z*cos(s13*ang+o13)>
  124. define loc14 <r14x*cos(s14*ang+o14),r14y*cos(s14*ang+o14),r14z*cos(s14*ang+o14)>
  125. define loc15 <r15x*cos(s15*ang+o15),r15y*cos(s15*ang+o15),r15z*cos(s15*ang+o15)>
  126. define loc16 <r16x*cos(s16*ang+o16),r16y*cos(s16*ang+o16),r16z*cos(s16*ang+o16)>
  127.  
  128. define milky_white
  129. texture {
  130.    surface {
  131.       ambient 0.1
  132.       diffuse 0.3
  133.       specular 0.2
  134.       reflection 0
  135.       transmission white, 0.7, 1.0
  136.       }
  137.    }
  138.  
  139. //
  140. // Using the multiple point locations, over time this makes a squirming blob
  141. //
  142. object {
  143.    blob thresh:
  144.       0.2, 3.0, loc1,
  145.       0.2, 3.0, loc2,
  146.       0.2, 3.0, loc3,
  147.       0.2, 3.0, loc4,
  148.       0.2, 3.0, loc5,
  149.       0.2, 3.0, loc6,
  150.       0.2, 3.0, loc7,
  151.       0.2, 3.0, loc8,
  152.       0.2, 3.0, loc09,
  153.       0.2, 3.0, loc10,
  154.       0.2, 3.0, loc11,
  155.       0.2, 3.0, loc12,
  156.       0.2, 3.0, loc13,
  157.       0.2, 3.0, loc14,
  158.       0.2, 3.0, loc15,
  159.       0.2, 3.0, loc16
  160.    root_solver Ferrari
  161.    u_steps 20
  162.    v_steps 20
  163.    milky_white
  164.    }
  165.  
  166. object { sphere loc1, 0.5 shiny_red }
  167. object { sphere loc2, 0.5 shiny_red }
  168. object { sphere loc3, 0.5 shiny_red }
  169. object { sphere loc4, 0.5 shiny_red }
  170. object { sphere loc5, 0.5 shiny_red }
  171. object { sphere loc6, 0.5 shiny_red }
  172. object { sphere loc7, 0.5 shiny_red }
  173. object { sphere loc8, 0.5 shiny_red }
  174. object { sphere loc09, 0.5 shiny_red }
  175. object { sphere loc10, 0.5 shiny_red }
  176. object { sphere loc11, 0.5 shiny_red }
  177. object { sphere loc12, 0.5 shiny_red }
  178. object { sphere loc13, 0.5 shiny_red }
  179. object { sphere loc14, 0.5 shiny_red }
  180. object { sphere loc15, 0.5 shiny_red }
  181. object { sphere loc16, 0.5 shiny_red }
  182.